//
//  PlayerView.swift
//  HHSwift
//
//  Created by qk-huahong on 2019/6/27.
//  Copyright © 2019 huahong. All rights reserved.
//

import UIKit
import AVFoundation
class PlayerView: UIView {

    
    var playerLayer : AVPlayerLayer{
        return self.layer as! AVPlayerLayer
    }
    
    var player : AVPlayer?{
        get{
            return playerLayer.player
        }
        
        set{
            playerLayer.player = newValue
        }
    }
    

    //默认返回CALayer类对象，子类重写此方法，返回特定的某个CALayer的子类
   override class var layerClass : AnyClass{
        return AVPlayerLayer.self
    }
    
    
    
}
